Document Variable Setup
To embed a document variable with narrative, start in Microsoft Word or OneStream Text Editor. When processing the document in OneStream File Explorer, select Process and Open in Text Editor Page or Process and Open to see the output in Text Editor or Microsoft Word. You can also edit the narrative, non-document variable content in Text Editor, including inserting new text or images.
The following functions can be used to embed refreshable content:
-
Document Variables: Enables you to insert content in a Microsoft Word document or OneStream Text Editor for XF Docs.
-
Rich Text Functionality: Enables document variables to support rich text functionality and view rich text content in Microsoft Word or OneStream Text Editor.
-
Show/Hide Field Codes: Enables you to view embedded content while in edit mode by toggling the content between processed and unprocessed views. Instead of navigating to OneStream File Explorer to process and open again, you can update document variables quickly, then refresh the Text Editor page to view updates.
-
Refresh Content: Enables you to save and refresh your edits directly from the document to easily view your updates
-
MergeFormat: Enables you to preserve document formatting when using parameters or substitution variables.
Document Variable Field
The DocVariable field enables you to insert extensible content from OneStream objects in Microsoft Word or Text Editor for XF Docs.
Quick Parts
Quick Parts is a Microsoft Word document feature available in Text Editor. The concept is similar to substitution variables in OneStream.
-
Go to Insert > Quick Parts > Field. Insert fields into a document that serve as placeholders for items such as Cube Views reports, Excel sheets, Excel Named Ranges, and more.
-
When the document is saved, refreshed, and opened, the fields dynamically update and display content
-
Field attributes and settings control what the field displays, how it operates, and where it is placed within the document.
Field Code
This function enables you to define the content item and formatting. Within Text Editor, go to the OneStream ribbon and select the Show Field Codes or Hide Field Codes button.
For the same result in Microsoft Word, right-click and select the Toggle option. You can also press Alt + F9.
TIP: If pressing Alt + F9 does not work, press Alt + Fn + F9 simultaneously
Alt Text
You can edit using the Alt Text functionality within OneStream Text Editor. Go to Format > Alt Text. Alt Text is disabled for text boxes and objects within Text Editor.
NOTE: In OneStream Text Editor, the Format ribbon will not display unless an image is selected.
In Microsoft Word, go to Picture Format > Alt Text.
Rich Text Functionality
Document variables support the use of parameters in Microsoft Word or OneStream Text Editor. You can view parameters containing Literal Values equal to rich text format, which can be referenced in the document variable. You can also paste rich text format or plain text to display in the specific document variable. Then, you can process and open the XF Docs in Microsoft Word and OneStream Text Editor.
TIP: If the rich text parameter content does not immediately display in Microsoft Word, press the Alt + F9 or Alt + Fn + F9 keys simultaneously to display the processed content.
Refresh Document
You can automatically refresh a document within Text Editor and OneStream updates all the new content and narrative immediately. This enables you to quickly edit, save, and re-process all content.
-
In Text Editor, go to OneStream > Refresh Document.
-
Select the Refresh Document button to refresh embedded content.
-
When selecting the Refresh Document button for an unprocessed XF Doc, you are prompted with a dialog box asking if you want to save your changes and refresh. Select the Yes button to save and re-process the document.
Preserve Formatting During Updates
You can preserve formatting when inserting a parameter in an XF Doc. This is optional and enables you to include formatting that is preserved during updates through MergeFormat.
-
When inserting a document variable within Microsoft Word or Text Editor, the document variable field dialog box displays. Select the Preserve formatting during updates checkbox.
NOTE: Within Microsoft Word, this is selected by default.
-
When this checkbox is selected, it adds the \*MERGEFORMAT syntax to the end of the variable.
When this checkbox is deselected, the \*MERGEFORMAT syntax is not added to the end of the variable.